<script type="text/javascript">

	$("#r_name").change(function()
	{
		var nik = $(this).val();
		var DataString = {id:nik};
		$.ajax({
			type: "POST",
			url : "<?php echo site_url('work_facility/globals_nik_detail')?>",
			dataType: 'json',
			data: DataString,
			success: function(data)
			{
				$("#r_id").val(data.DetailEmp.HR_ID);
				$("#r_mgr").val(data.DetailEmp.MANAGER);
				$("#r_nama").val(data.DetailEmp.NAME);
				$("#r_mgrid").val(data.DetailEmp.MANAGER_ID);
				$("#r_dept").val(data.DetailEmp.ORG);
				$("#r_job").val(data.DetailEmp.JOB_POSITION);
				
				//document.Parking_add.Emp_Name.value = data.DetailEmp.NAME;
				//document.Parking_add.Emp_Mgr.value = data.DetailEmp.MANAGER;
				//document.Parking_add.Emp_Dept.value = data.DetailEmp.ORG;
				//document.Parking_add.Emp_Job.value = data.DetailEmp.JOB_POSITION;																
			}			
		});
	});

	$("#vendor_id1").change(function() 
	{   
		var venid = $(this).val();
		var DataString = {id:venid};
		$.ajax({
			type: "POST",
			url : "<?php echo site_url('work_facility/globals_ven_detail')?>",
			dataType: 'json',
			data: DataString,
			success: function(data)
			{
				$("#r_venid1").val(data.DetailVen.VENDOR_ID); 
				$("#r_vennama1").val(data.DetailVen.VENDOR_NAME);
				$("#r_venpic1").val(data.DetailVen.PIC);			
			}            			
		});
	});
	
	$("#vendor_id2").change(function() 
	{   
		var venid = $(this).val();
		var DataString = {id:venid};
		$.ajax({
			type: "POST",
			url : "<?php echo site_url('work_facility/globals_ven_detail')?>",
			dataType: 'json',
			data: DataString,
			success: function(data)
			{
				$("#r_venid2").val(data.DetailVen.VENDOR_ID); 
				$("#r_vennama2").val(data.DetailVen.VENDOR_NAME);
				$("#r_venpic2").val(data.DetailVen.PIC);			
			}            			
		});
	});	
	
	$("#vendor_id3").change(function() 
	{   
		var venid = $(this).val();
		var DataString = {id:venid};
		$.ajax({
			type: "POST",
			url : "<?php echo site_url('work_facility/globals_ven_detail')?>",
			dataType: 'json',
			data: DataString,
			success: function(data)
			{
				$("#r_venid3").val(data.DetailVen.VENDOR_ID); 
				$("#r_vennama3").val(data.DetailVen.VENDOR_NAME);
				$("#r_venpic3").val(data.DetailVen.PIC);			
			}            			
		});
	});
	
	$("#vendor_id4").change(function() 
	{   
		var venid = $(this).val();
		var DataString = {id:venid};
		$.ajax({
			type: "POST",
			url : "<?php echo site_url('work_facility/globals_ven_detail')?>",
			dataType: 'json',
			data: DataString,
			success: function(data)
			{
				$("#r_venid4").val(data.DetailVen.VENDOR_ID); 
				$("#r_vennama4").val(data.DetailVen.VENDOR_NAME);
				$("#r_venpic4").val(data.DetailVen.PIC);			
			}            			
		});
	});
	
	$("#vendor_id5").change(function() 
	{   
		var venid = $(this).val();
		var DataString = {id:venid};
		$.ajax({
			type: "POST",
			url : "<?php echo site_url('work_facility/globals_ven_detail')?>",
			dataType: 'json',
			data: DataString,
			success: function(data)
			{
				$("#r_venid5").val(data.DetailVen.VENDOR_ID); 
				$("#r_vennama5").val(data.DetailVen.VENDOR_NAME);
				$("#r_venpic5").val(data.DetailVen.PIC);			
			}            			
		});
	});
		
</script>
</body>
</html>